// 1.引入request 拿什么发
import request from "../../utils/request.js"
// 2.创建Vuex的核心概念
const state = {
	cateDataList:[]
}
const mutations = {
	SET_CATEDATALIST(state,payload){
		state.cateDataList = payload
	}
}
const actions = {
	async getCateDataList({commit}){
		// 4.往拿发
		const res = await request("/getCateGoryData")
		console.log(res);
		commit("SET_CATEDATALIST",res)
	}
}
const getters = {
	
}
// 3.对外暴露
export default {
	namespaced:true,
	state,
	mutations,
	actions,
	getters
}